//
//  CarViolationOrderRequest.m
//  EasyToo
//
//  Created by linshengqin on 13-9-30.
//
//

#import "CarViolationOrderRequest.h"

@implementation CarViolationOrderRequest

-(id)initOrderVehicleNo:(NSString*)vehicleNo
           VehicleColor:(NSString*)color
                 RackNo:(NSString*)rackNo
                EnginNo:(NSString*)enginNo
               PostMode:(NSString*)postMode
                PostFee:(NSString*)postFee
               PhoneNum:(NSString*)phoneNum
            OrderDetail:(NSString*)orderDetail
            TotalAmount:(NSString*)totalAmount
               Delegate:(id<ServerCommunicationDelegate>)delegate;
{
    self = [super init];
    if (self)
    {
        self.requestName = @"CarViolationOrderRequest";
        self.delegate = delegate;
        self.vehicleNo = vehicleNo;
        self.colorType = color;
        self.rackNo = rackNo;
        self.enginNo = enginNo;
        self.url = PROTOCOL_ORDER_URL;

        [self.bodyJsonDict setObject:self.vehicleNo forKey:@"VehicleNo"];
        [self.bodyJsonDict setObject:self.colorType forKey:@"VehicleColor"];
        [self.bodyJsonDict setObject:self.rackNo forKey:@"RackNo"];
        [self.bodyJsonDict setObject:self.enginNo forKey:@"EnginNo"];
        
        [self.bodyJsonDict setObject:phoneNum forKey:@"MobileNo"];
        [self.bodyJsonDict setObject:postFee forKey:@"PostFee"];
        [self.bodyJsonDict setObject:postMode forKey:@"PostMode"];

        /*
        [self.bodyJsonDict setObject:@"4407057900256123%236001%232012-07-19%2015%3A33%3A00%231208%23%E6%B1%9F%E9%97%A8%E5%B8%82%E6%96%B0%E4%BC%9A%E5%8C%BA%E4%BC%9A%E5%9F%8E%E4%B9%9D%E9%BE%99%E7%BA%A2%E7%BB%BF%E7%81%AF%E8%B7%AF%E5%8F%A3%E6%B1%9F%E9%97%A8%E5%B8%82%E6%96%B0%E4%BC%9A%E5%8C%BA%E4%BC%9A%E5%9F%8E%E4%B9%9D%E9%BE%99%E7%BA%A2%E7%BB%BF%E7%81%AF%E8%B7%AF%E5%8F%A3%7C4401103867158900%236001%232012-07-25%2012%3A39%3A09%234305%23%E5%B9%BF%E6%BE%B3%E9%AB%98%E9%80%9F" forKey:@"BillnoList"];
         */
        [self.bodyJsonDict setObject:@"20133607133628" forKey:@"InstituteTime"];


        [self.headerJsonDict setObject:@"002002" forKey:@"TranCode"];
        [self.headerJsonDict setObject:@"20" forKey:@"TxRecordNum"];
        [self.headerJsonDict setObject:[NSString stringWithFormat:@"%d", totalAmount.intValue] forKey:@"TxAmt"];
        
        [self buildJsonRequest];

    }
    return self;
}

@end
